<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="c.tld" prefix="c" %>
<%@ taglib uri="sql.tld" prefix="sql" %>
<jsp:useBean id="beanConsultaResposta" class="classes.BeanConsultaResposta" scope="session"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>

	<!-- data source -->
	
	<c:import url="/WEB-INF/Database/dataSourceMysql.jsp"/>
	
	<!-- set bean -->
	
	<jsp:setProperty property="idProtocolo" name="beanConsultaResposta" param="protocolo"/>
	
	<!-- objeto -->
	
	<sql:query var="queryConsultaRegistroResposta" scope="session">
		select B.alias,A.resposta,
		CONCAT_WS('/',SUBSTRING(A.dataresposta,1,2),SUBSTRING(A.dataresposta,3,2),SUBSTRING(A.dataresposta,5,4)) as dataResposta,
		CONCAT_WS(':',SUBSTRING(A.horaresposta,1,2),SUBSTRING(A.horaresposta,3,2),SUBSTRING(A.horaresposta,5,2)) as horaResposta  
		from faleconoscoresposta A
		left join login B on B.idlogin = A.idlogin
		left join faleconoscopergunta C on C.idfaleconoscopergunta = A.idfaleconoscopergunta
		where A.idfaleconoscopergunta = ?
		order by A.idfaleconoscopergunta desc
	<sql:param><c:out value="${beanConsultaResposta.idProtocolo}"/></sql:param>	
	</sql:query>
	
	<!-- redirect -->
	
	<c:redirect url="Controller.jsp">
		<c:param name="redirectVListaConsultaResposta"><c:out value="redirect"/></c:param>	
	</c:redirect>	

</body>
</html>